Source File
axis.go
Belonging Package
github.com/K-Phoen/grabana/axis
package axisimport ()// Option represents an option that can be used to configure an axis.type Option func(axis *Axis)// Axis represents a visualization axis.type Axis struct {Builder *sdk.Axis}// New creates a new Axis configuration.func ( ...Option) *Axis {:= &Axis{Builder: &sdk.Axis{Format: "short",Show: true,LogBase: 1,}}for , := range {()}return}// Unit sets the unit of the data displayed on this axis.func ( string) Option {return func( *Axis) {.Builder.Format =}}// Hide makes the axis hidden.func () Option {return func( *Axis) {.Builder.Show = false}}// LogBase allows to change the logarithmic scale used to display the values.func ( int) Option {return func( *Axis) {.Builder.LogBase =}}// Label sets the label on this axis.func ( string) Option {return func( *Axis) {.Builder.Label =}}// Min sets the minimum value expected on this axis.func ( float64) Option {return func( *Axis) {.Builder.Min = sdk.NewFloatString()}}// Max sets the maximum value expected on this axis.func ( float64) Option {return func( *Axis) {.Builder.Max = sdk.NewFloatString()}}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |